<?php
#
#
# Copyright TEDECO, 2009. http://tedeco.fi.upm.es
#
# This file is part of kumenya.
#
# Kumenya is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Kumenya is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
#
#
#
?>
<?php
	include("../commons/clases.php");
	include("../commons/www.php");
	include(Accion . "students_list_aux.php");

	Interfaz::Cabecera(_("Bulletin") . "" . _(""));

	Interfaz::AbrirCuerpo(FALSE);

    Interfaz::Formulario (Pagina. "export_pdf.php");

	Interfaz::Botones ();
	Interfaz::BotonDeEnvio (_("Create PDF"), FALSE);
	Interfaz::CerrarBotones ();

    // Editable variables.
    $Host = "localhost";
    $User = "kumenyaapp";
    $Password = "EfJ7i49c3v11";
    $DBName = "kumenya_matriculacion";
        
    $select_careers = "SELECT Uid, Carrera FROM carreras";
    // End editable variables.
    
    // Connect to DB
    $link = mysql_connect ($Host, $User, $Password) or die('Could not connect: ' . mysql_error());
    mysql_select_db($DBName) or die('Could not select database');
    
    // Fill careers combobox.
    $export = mysql_query($select_careers);
    echo '<label for="career">Career : </label>';
    echo '<select name="career" size="1">';  
    while($row = mysql_fetch_row($export))
    {
        echo '<option value="'.$row[0].'">'.$row[1].'</option>';  
    }  
    echo '</select><br />';  
    
    // Year
    echo '<label for="student">Student code : </label>';
    echo '<input type="text" name="student" maxlength="7"/>';
    mysql_close($link);
	Interfaz::CerrarFormulario();

   	Interfaz::Fin(FALSE);
?>
